package com.masterrabbit.service;

import com.masterrabbit.domain.Merchants;
import com.masterrabbit.mapper.MerchantsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MerchantsService {
    @Autowired
    private MerchantsMapper merchantsMapper;
    public int insertMerchants(Merchants merchants) {
        return merchantsMapper.insert(merchants);
    }
    public int updateMerchants(Merchants merchants) {
        return merchantsMapper.updateByPrimaryKeySelective(merchants);
    }
    public int deleteMerchants(Long id) {
        return merchantsMapper.deleteByPrimaryKey(id);
    }
    public Merchants selectMerchants(Long id) {
        return merchantsMapper.selectByPrimaryKey(id);
    }
    public List<Merchants> selectMerchantsList() {


        return merchantsMapper.select();
    }




}
